<template>
    <div>
      <button @click="ck(5)">用户管理</button>
      <button @click="ck(6)">商品管理</button>
      <f1 v-show="this.arr[0].num1 == 5" :arr="arr"></f1>
      <f2 v-show="this.arr[0].num1 == 6" :arr="arr2"></f2>
    </div>
  </template>
  <script>
  import f1 from "./components/分页器/商品管理.vue";
  import f2 from "./components/分页器/用户管理.vue";
  export default {
    data() {
      return {
        arr: [
          { name: "曙光", num: 10, shu: 1, num1: 5 },
          { name: "曙光", num: 10, shu: 1 },
          { name: "曙光", num: 10, shu: 1 },
          { name: "曙光", num: 10, shu: 1 },
          { name: "曙光", num: 10, shu: 1 },
          { name: "曙光", num: 10, shu: 2 },
          { name: "曙光", num: 10, shu: 1 },
          { name: "曙光", num: 10, shu: 1 },
          { name: "曙光", num: 10, shu: 1 },
          { name: "曙光", num: 10, shu: 1 },
          { name: "曙光", num: 10, shu: 1 },
          { name: "曙光", num: 10, shu: 1 },
        ],
        arr2:[
        { name: "曙", num: 10, shu: 1, num1: 5 },
          { name: "曙", num: 10, shu: 1 },
          { name: "曙", num: 10, shu: 1 },
          { name: "曙", num: 10, shu: 1 },
          { name: "曙", num: 10, shu: 1 },
          { name: "曙", num: 10, shu: 2 },
          { name: "曙", num: 10, shu: 1 },
          { name: "曙", num: 10, shu: 1 },
          { name: "曙", num: 10, shu: 1 },
          { name: "曙", num: 10, shu: 1 },
          { name: "曙", num: 10, shu: 1 },
          { name: "曙", num: 10, shu: 1 },
        ]
      };
    },
    components: {
      f1,
      f2,
    },
    created() {
      // console.log(this.arr[0].num1);
    },
    computed: {},
    methods: {
      ck(e) {
        this.arr[0].num1 = e;
        this.arr2[0].num1 = e;
        // console.log(this.arr[0].num1);
      },
    },
  };
  </script>
  <style lang='less' scoped>
  </style>
  